package edu.cmu.ibill.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import edu.cmu.ibill.model.Model;

/**
 * 
 * @author Yunkai Zhang
 * 15-637
 */


public class LogoutAction extends Action {
	
	public LogoutAction(Model model) {
	}


	@Override
	public String getName() {
		return "logout.do";
	}

	@Override
	public String perform(HttpServletRequest request) {
		
		HttpSession session = request.getSession();
		session.setAttribute("user", null);
		
		return "login.jsp";
	}

}
